<?php
namespace App\Admin\Actions\Grid;

use App\Admin\Form\CompanyRechargeFrom;
use Dcat\Admin\Grid\RowAction;
use Dcat\Admin\Grid\Tools\AbstractTool;
use Dcat\Admin\Widgets\Modal;

class CompanyRecharge extends RowAction
{
    protected $title = '报名单管理';

    protected $style = 'btn btn-outline-success btn-sm';

    public function render()
    {
        // 实例化表单类并传递自定义参数
        $form = CompanyRechargeFrom::make()->payload(['id'=>$this->getKey()]);
        return Modal::make()
            ->lg()
            ->title($this->title)
            ->body($form)
            ->button("<button class='$this->style '>$this->title</button>");
    }
}
